{{set . "title" "用户管理"}}
{{append . "moreStyles" "css/admin/admin-user.css"}}
{{append . "moreScripts" "js/admin/admin-user-create.js"}}
{{template "Layout/AdminHeader.html" .}}
<div class="main admin-user">
  <h2 class="page-header title">{{.title}}</h2>
  <div class="sub-opration">
      <button class="btn btn-primary btn-sm" 
         onclick="javascript:location.href='/admin/user/create'">
           新增
        </button> 
        <button class="btn btn-danger btn-sm" onclick="deletethem()">删除选中项</button>
  </div>
  <div>
      <div>
        {{if gt (len .users) 0}}
        <table class="table table-striped">
          <thead>
            <tr>
              <th><input type="checkbox"></th>
              <th>用户名</th>
              <th>昵称</th>
              <th>邮箱</th>
              <th>管理组</th>
            </tr>
          </thead>
          <tbody>
              {{range .users}}
                <tr>
                    <td><input class="mul-check" value="{{.Id}}" type="checkbox"></td>
                    <td><a href="/admin/user/edit/{{.Id}}">{{.Name}}</a></td>
                    <td>{{.Nickname}}</td>
                    <td>{{.Email}}</td>
                    <td>{{.Group}}</td>
                </tr>
              {{end}}
          </tbody>
          {{else}}
            没有用户
          {{end}}
        </table>
      </div>
  </div>
</div>
{{template "Layout/AdminFooter.html" .}}